#ifndef MCL_PARSER_H_
#define MCL_PARSER_H_

#include "mcl/val.h"
#include "mcl/code.h"

struct parser {
	struct runtime *rt;
	char const *code;
	usize curr;
	struct pos pos;
};

struct parser new_parser(struct runtime *rt, char const *code);

struct lvalue_opt {
	struct lvalue *val;
	enum code code;
};

struct lvalue_opt parse_val(struct parser *p, struct lvalue_uninit *return_val);

bool eof(struct parser *p);

#endif
